<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="utf-8">
    <title>文件列表</title>
    <link rel="stylesheet" href="${ctx}/css/file-list.css"/>
    <link rel="stylesheet" href="${ctx}/res/font-awesome-4.7.0/css/font-awesome.min.css"/>
</head>
<body>
<a href="${ctx}/upload?currPath=${fn:join(fileNames, '/')}">文件上传入口<i class="fa fa-hand-o-right fa-fw"></i></a>
<br>
${message}
<br>
<a href="${ctx}/fileList?fileName=${upName}"><i class="fa fa-arrow-up fa-fw"></i>向上</a>&nbsp;&nbsp;&nbsp;
<span>当前路径【./</span>
<c:set var="flag" value=""/>
<c:forEach var="fname" items="${fileNames}" varStatus="vs">
    <c:if test="${not empty fname}">
        <c:set var="flag" value="${flag}/${fname}"/>
    </c:if>
    <c:if test="${not vs.last}">
        <c:if test="${not empty fname}">
            <a href="${ctx}/fileList?fileName=${flag}">${fname}</a><span>/</span>
        </c:if>
    </c:if>
    <c:if test="${vs.last}">
        <span>${fname}</span>
    </c:if>
</c:forEach><span>】</span>
<br>
<c:forEach items="${files}" var="f">
        <span class="box" title="${f.fileName}">
            <c:if test="${f.flag eq 0}">
                <a href="${ctx}/fileList?fileName=${fileName}/${f.fileName}">
                    <i class="fa fa-folder fa-fw"></i>
                    <span>${f.fileName}</span>
                </a>
            </c:if>
            <c:if test="${f.flag eq 1}">
                <a href="${ctx}/server/fileDown?fileName=${fileName}/${f.fileName}">
                    <i class="fa fa-file fa-fw"></i>
                    <span>${f.fileName}</span>
                </a>
            </c:if>
        </span>
</c:forEach>
</body>
</html>
